<div class="paging">
    <?php
    echo $this->Paginator->options(array('update' => '#content', 'evalScripts' => false));
    echo $this->Paginator->prev('< ' . __('Vorherig'), array(), null, array('class' => 'prev disabled'));
    echo $this->Paginator->numbers(array('separator' => ''));
    echo $this->Paginator->next(__('Folgend') . ' >', array(), null, array('class' => 'next disabled'));
    ?>
</div>
<table>
    <thead>
        <tr>
            <th><?php echo $this->Paginator->sort('Ingredient.id', 'Id'); ?></th>
            <th><?php echo $this->Paginator->sort('Ingredient.type', 'Typ'); ?></th>
            <th><?php echo $this->Paginator->sort('Ingredient.name', 'Name'); ?></th>
            <th><?php echo $this->Paginator->sort('Ingredient.description', 'Beschreibung'); ?></th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($Ingredients as $Ingredient): ?>
            <tr>
                <td><?php echo $Ingredient['Ingredient']['id']; ?></td>
                <td><?php echo $Ingredient['Ingredient']['type']; ?></td>
                <td><?php echo $Ingredient['Ingredient']['name']; ?></td>
                <td><?php echo $Ingredient['Ingredient']['description']; ?></td>
                <td><?php echo $this->Ajax->link('Bearbeiten', array('controller' => 'Ingredients', 'action' => 'edit', $Ingredient["Ingredient"]["id"]), array('update' => 'content', 'indicator' => 'loading')); ?></td>
                <td><?php echo $this->Ajax->link('Löschen', array('controller' => 'Ingredients', 'action' => 'delete', $Ingredient["Ingredient"]["id"]), array('update' => 'content', 'indicator' => 'loading'), "Die Zutat wirklich löschen?"); ?></td>
            </tr>
        <?php endforeach; ?>
    </tbody>
</table>
<br><br>
<?php echo $this->Js->writeBuffer(); ?>
<?php echo $this->Ajax->link('Hinzufügen', array('controller' => 'Ingredients', 'action' => 'add'), array('update' => 'content', 'indicator' => 'loading')); ?>
<br><br>
<?php echo $this->Html->link('Zurück', array('controller' => 'Users', 'action' => 'home'), array('update' => 'content')); ?>